//
//  BasicItem.m
//  howcan
//
//  Created by apple on 4/14/12.
//  Copyright 2012 __MyCompanyName__. All rights reserved.
//

#import "BasicItem.h"


@implementation BasicItem

@synthesize item_title,item_subtitle,item_input,item_count,item_checkbox;

- (void)dealloc {
	[item_checkbox release];
	[item_count release];
	[item_input release];
	[item_subtitle release];
	[item_title release];
	[super dealloc];
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
	id ret_id;	
	NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"BasicItem" owner:self options:nil];


		for (id oneObject in nib) 
				if ([oneObject isKindOfClass:[UITableViewCell class]]) 
					ret_id = oneObject;
//	id ret_id = [super initWithStyle:style reuseIdentifier:reuseIdentifier];		

	
	
	if ([item_subtitle.text isEqualToString:@""]) {
		[item_subtitle setHidden:YES];
		[item_input.layer initWithTitle:@"test"];
		item_input.frame = CGRectMake(item_title.frame.origin.x + item_title.frame.size.width+5,item_title.frame.origin.y,item_input.frame.size.width,item_input.frame.size.height);
		
	}
	return ret_id;
}

/*
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/

- (void)viewDidUnload {
	// Release any retained subviews of the main view.
	// e.g. self.myOutlet = nil;
}



@end
